<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3_帅哥美女走一走</title>
</head>
<body>
    <div id="app">
        <!-- {{ item.name }} -->
        <li v-for="(item, index) in list">{{ item }}</li> 
        <button @click="changeOrder">走一走</button>
    </div>
    <script src="./vue.js"></script>
    <script>
        const app = new Vue({
            el: "#app",
            // { id: 1, name: '帅哥' },{ id: 1, name: '美女' },{ id: 1, name: '程序猿' },
            data: {
                list: ['帅哥', '美女', '程序猿']
            },
            methods: {
                changeOrder() {
                    this.list.push(this.list.shift())
                }
            }
        })
    </script>
</body>
</html>